/* 
 * File:   FractalView.h
 * Author: amouro-m
 *
 * Created on 18 mai 2010, 09:14
 */

#ifndef _FRACTALVIEW_H
#define	_FRACTALVIEW_H

#include <QWidget>

#include "tools.h"
#include "FractalPrinter.h"
#include "Filtre.hpp"

class FractalView:public QWidget {
    Q_OBJECT
    
public:
    FractalView(unsigned int width, unsigned int height, QWidget *parent=0);
    virtual ~FractalView();

    SDL_Surface* get_area() const;
    FractalPrinter* get_fractal_printer() const;

    void set_fractal_printer(FractalPrinter* fractal_printer);
    void set_fractal(Fractal* fractal);
    void filtre_apply(Filtre& filtre);

protected:
    virtual void paintEvent(QPaintEvent* e);
    
private:
    unsigned int    _width;
    unsigned int    _height;
    SDL_Surface*    _area;
    FractalPrinter* _fractal_printer;
};

#endif	/* _FRACTALVIEW_H */